﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Effects.Conditions
{
    public class PointerOverEntity
    {

        /// <summary>
        /// Evaluates if the condition is satisfied
        /// </summary>
        /// <param name="mouse">Pointer controlled by the user</param>
        /// <param name="entity">Entity to refer to</param>
        /// <returns>Boolean stating if mouse is over or outside of entity's zone</returns>
        public bool conditionSatisfied(Input.Mouse mouse, Engine.Entity entity)
        {
            return (mouse.CurrentPosition.X >= entity.positionSize.Left
                && mouse.CurrentPosition.X < entity.positionSize.Right
                && mouse.CurrentPosition.Y >= entity.positionSize.Top
                && mouse.CurrentPosition.Y < entity.positionSize.Bottom);
        }

    }
}
